﻿<navigation:Page
  x:Class="Reactor.Client.Home" 
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
  xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation" 
  xmlns:Controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit" 
  xmlns:Views="clr-namespace:Reactor.Client.Views" mc:Ignorable="d" 
  d:DesignWidth="640" d:DesignHeight="480"  
  DataContext="{Binding Home, Source={StaticResource Locator}}"
  Style="{StaticResource PageStyle}">
    <navigation:Page.Resources>
        <DataTemplate x:Key="CoreItemTemplate">
            <Views:CoreView />
        </DataTemplate>
        <ItemsPanelTemplate x:Key="CoreItemPanel">
            <Controls:WrapPanel FlowDirection="LeftToRight" />
        </ItemsPanelTemplate>
    </navigation:Page.Resources>
    <Grid x:Name="LayoutRoot">
        <ScrollViewer x:Name="PageScrollViewer" Style="{StaticResource PageScrollViewerStyle}" >
            <StackPanel x:Name="ContentStackPanel" Style="{StaticResource ContentStackPanelStyle}">
                <TextBlock x:Name="HeaderText" Style="{StaticResource HeaderTextStyle}" Text="{Binding Path=ApplicationStrings.HomePageTitle, Source={StaticResource ResourceWrapper}}"/>
                <ListBox 
                    ScrollViewer.VerticalScrollBarVisibility="Disabled" 
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ItemsSource="{Binding Cores}"
                    ItemsPanel="{StaticResource CoreItemPanel}"
                    ItemTemplate="{StaticResource CoreItemTemplate}"
                    Padding="5" Width="1000" BorderThickness="0">
                </ListBox>
            </StackPanel>
        </ScrollViewer>
    </Grid>
</navigation:Page>